﻿Ctn.dd = {};
//创建拖动对象
var Drag = Ctn.Class.create();
Ctn.dd.Drag = Drag;
Drag.prototype = {
    id: null,
    handler: null,
    cursor: 'move',
    minX: 0,
    minY: 0,
    maxX: 0,
    maxY: 0,
    startX: 0,
    startY: 0,
    _construct: function(id, options){
        this.id = id;
        if (options){
            Ctn.extend(this, options);
        }
        if (!this.handler){
            this.handler = this.id;
        }
        Ctn(this.handler).mousedown(Drag._mouseDown);
        Ctn(this.handler).mouseup(Drag._mouseUp);
        Ctn(window).mouseMove(Drag._mouseUp);
    },
    _mouseDown: function(evt){
        
    },
    _mouseUp: function(evt){
        
    },
    _mouseMove: function(evt){
        
    },
    startDrag: function(){
        
    },
    endDrag: function(){
        
    },
    stopDrag: function(){
        
    }
}